home *** CD-ROM | disk | FTP | other *** search
- ==============================================================================
- ENGLISH ONLY: The Strateq + AI Competition!
- ==============================================================================
-
- Even if I decide to actually write the Strateq + version, I won't invent an AI
- routine for it myself. That is for you other AMOS programmers out there to do.
-
- Send in your routines in either ASCII or AMOS form, preferably fully
- commented, and I shall possibly even use them, with the reward of mentioning
- your name in Strateq + ! If you want money for your routines, say so and I
- just might see what I can do about it.
-
- ------------------------------------------------------------------------------
- AMOS-talk about the program
- ------------------------------------------------------------------------------
-
- First, you should only use very weird variable, procedure and label names such
- as JEEP or CAULIFLOWER as your own names to avoid confusion with my names.
-
- Second, here are the common numeral values for the pieces.
- 0=Soldier 1=Warrior 2=YIN 3=YANG
- 4=Equestrian 5=Pegasus 6=Emperor 7=Empress
- 8=Wraith 9=Warlord 10=Battleship 11=Dreadnought
- 12=Leviathan 13=Construction Dock14=Main Factory
-
- Third, here is a list of my variables, procedures and routines.
-
- Variables:
- TURN whichever player is currently in charge (0 or 1)
- OB(11,11) an array which shows the board's contents:
- bits 0-1: what kind of piece/chip?
- 0 = 1-square piece / no chip
- 1 = 2-square piece l / chip 1
- 2 = 2-square piece r / chip 2
- 3 = 4-square piece / chip 3
- 4 = chip 4
- bits 2-3: piece or chip?
- 0 = piece of player 1
- 4 = piece of player 2
- 8 = chip
- 12 = chip
- bit 4: is the square available?
- SH(63,1) the shapes of 64 pieces in one side (0...15)
- substract 1 to gain num / 0 = no piece
- XY(63,1) the positions of 64 pieces (X+(16*Y))
- ALF(63,1) the armour left of 64 pieces
- OWN, NME include 0 and 4 or vice versa dep. on TURN
- MONEY(1) players' money
- PRI(14),BOU(14) the prices and bounties of the piece types
- ARM(14),STR(14) the armour ratings and strengths of the types
- EMPDEAD(1) how many Imperials of a player have died
-
- Functions:
- FnIS(x,y) OB(x,y) and 12
- FnWH(x,y) OB(x,y) and 3
-
- Procedures:
- AVAIL[x,y] Make (x,y) available for 1-square piece
- LONGAVAIL[x,y] Make (x,y) available for 2-square piece
- (square is piece's left edge)
- FLUSHBOARD Remove all avail-bits
- PIC[num,x,y,sel] Draw piece number num at (x,y)
- Set sel to 1 for selected image
- Use num=-1 for empty squares
- NEWPIECE[num,x,y] Make new piece (type num) at x,y
- WHATPIECE[x,y] Finds out what piece is in (x,y) and returns its
- number (used with the SH(), ALF() and XY()
- arrays) in variable N
-
- Routines:
- MOVEMENT Calculate all possible moves for piece
- (set variables PX & PY to piece's coordinates
- and variable NUM to piece's type)
- MOVE move piece from PX,PY to QX,QY
- FIGHT Attack a piece at EX,EY (for 2-square pieces,
- set variable SHIP to -1)
-
- That was all. Now get programming!
- See you later in another documentation!
-
- Remember that I am open to any questions about this programming-type thing.
-
- So long!
- - JIPsoft
-